<template>
  <div>
    <!-- 面包屑导航 -->
    <el-breadcrumb separator="/">
      <el-breadcrumb-item :to="{ path: '/home' }">
        <i class="el-icon-s-home"></i>
        首页
      </el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/limits/store/list' }">
        <i class="el-icon-monitor"></i>
        权限管理
      </el-breadcrumb-item>
      <!-- 当前 -->
      <el-breadcrumb-item>查看详情</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="content">
      <div style="padding: 40px;">
        <div class="item">
          <p class="p1">门店名称:</p>
          <p>{{ data.name }}</p>
        </div>
        <div class="item">
          <p class="p1">门店图片:</p>
          <img style="width: 100px;" :src="data.img" alt="">
        </div>
        <div class="item">
          <p class="p1">省市区:</p>
          <p>{{ data.adress }}</p>
        </div>
        <div class="item">
          <p class="p1">门店经纬度:</p>
          <p>{{ data.deg }}</p>
        </div>
        <div class="item">
          <p class="p1">门店地址:</p>
          <p>{{ data.deadress }}</p>
        </div>
        <div class="item">
          <p class="p1">门店电话:</p>
          <p>{{ data.people }}</p>
        </div>
        <div class="item">
          <p class="p1">营业时间:</p>
          <p>{{ data.time }}</p>
        </div>
        <div class="item">
          <p class="p1">门店支持:</p>
          <el-checkbox-group v-model="checkList">
            <el-checkbox label="支持自提"></el-checkbox>
            <el-checkbox label="支持外卖"></el-checkbox>
          </el-checkbox-group>
        </div>
        <div class="item">
          <p class="p1">联系人信息:</p>
          <p>姓名:{{ data.lxpeople }}</p>
          <p style="margin-left: 20px;">电话:{{ data.lxphone }}</p>
        </div>

        <el-button style="margin-left: 30px;" @click="fh" type="primary" size="small">返回列表</el-button>
      </div>
    </div>
  </div>
</template>
<script>
import {getShopListBx} from '../../utils/api'
export default {
  data() {
    return {
      detailId: 0,
      checkList: ['支持自提'],
      data:{},
    }
  },
  created() {
    this.detailId = this.$route.query.id
    console.log(this.$route.query.id);
    getShopListBx().then(res=>{
      const obj = res.data.data.find(item=>{
        return item.id == this.detailId
      })
      if(obj.support == '1'){
        this.checkList = ['支持自提']
      }else if(obj.support == '2'){
        this.checkList = ['支持外卖']
      }else if(obj.support == '3'){
        this.checkList = ['支持自提','支持外卖']
      }
      this.data = obj
      
    })
  },
  methods: {
    fh(){
      this.$router.push('/limits/store/list')
    }
  }
}
</script>
<style scoped>
.item {
  display: flex;
  margin-bottom: 40px;
}

.content {
  width: 100%;
  height: 100%;
  font-size: 14px;
}

.p1 {
  width: 100px;
  margin-right: 30px;
}
</style>